Optimal. Leaf size=191 \[ -\frac {5 a^3 \tanh ^{-1}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{128 \sqrt {2} c^{9/2} f}+\frac {a^3 c^2 \cos ^5(e+f x)}{4 f (c-c \sin (e+f x))^{13/2}}-\frac {5 a^3 \cos ^3(e+f x)}{24 f (c-c \sin (e+f x))^{9/2}}+\frac {5 a^3 \cos (e+f x)}{32 c^2 f (c-c \sin (e+f x))^{5/2}}-\frac {5 a^3 \cos (e+f x)}{128 c^3 f (c-c \sin (e+f x))^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.24, antiderivative size = 191, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {2815, 2759,
2729, 2728, 212} \begin {gather*} -\frac {5 a^3 \tanh ^{-1}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{128 \sqrt {2} c^{9/2} f}-\frac {5 a^3 \cos (e+f x)}{128 c^3 f (c-c \sin (e+f x))^{3/2}}+\frac {a^3 c^2 \cos ^5(e+f x)}{4 f (c-c \sin (e+f x))^{13/2}}+\frac {5 a^3 \cos (e+f x)}{32 c^2 f (c-c \sin (e+f x))^{5/2}}-\frac {5 a^3 \cos ^3(e+f x)}{24 f (c-c \sin (e+f x))^{9/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2728
Rule 2729
Rule 2759
Rule 2815
Rubi steps
\begin {align*} \int \frac {(a+a \sin (e+f x))^3}{(c-c \sin (e+f x))^{9/2}} \, dx &=\left (a^3 c^3\right ) \int \frac {\cos ^6(e+f x)}{(c-c \sin (e+f x))^{15/2}} \, dx\\ &=\frac {a^3 c^2 \cos ^5(e+f x)}{4 f (c-c \sin (e+f x))^{13/2}}-\frac {1}{8} \left (5 a^3 c\right ) \int \frac {\cos ^4(e+f x)}{(c-c \sin (e+f x))^{11/2}} \, dx\\ &=\frac {a^3 c^2 \cos ^5(e+f x)}{4 f (c-c \sin (e+f x))^{13/2}}-\frac {5 a^3 \cos ^3(e+f x)}{24 f (c-c \sin (e+f x))^{9/2}}+\frac {\left (5 a^3\right ) \int \frac {\cos ^2(e+f x)}{(c-c \sin (e+f x))^{7/2}} \, dx}{16 c}\\ &=\frac {a^3 c^2 \cos ^5(e+f x)}{4 f (c-c \sin (e+f x))^{13/2}}-\frac {5 a^3 \cos ^3(e+f x)}{24 f (c-c \sin (e+f x))^{9/2}}+\frac {5 a^3 \cos (e+f x)}{32 c^2 f (c-c \sin (e+f x))^{5/2}}-\frac {\left (5 a^3\right ) \int \frac {1}{(c-c \sin (e+f x))^{3/2}} \, dx}{64 c^3}\\ &=\frac {a^3 c^2 \cos ^5(e+f x)}{4 f (c-c \sin (e+f x))^{13/2}}-\frac {5 a^3 \cos ^3(e+f x)}{24 f (c-c \sin (e+f x))^{9/2}}+\frac {5 a^3 \cos (e+f x)}{32 c^2 f (c-c \sin (e+f x))^{5/2}}-\frac {5 a^3 \cos (e+f x)}{128 c^3 f (c-c \sin (e+f x))^{3/2}}-\frac {\left (5 a^3\right ) \int \frac {1}{\sqrt {c-c \sin (e+f x)}} \, dx}{256 c^4}\\ &=\frac {a^3 c^2 \cos ^5(e+f x)}{4 f (c-c \sin (e+f x))^{13/2}}-\frac {5 a^3 \cos ^3(e+f x)}{24 f (c-c \sin (e+f x))^{9/2}}+\frac {5 a^3 \cos (e+f x)}{32 c^2 f (c-c \sin (e+f x))^{5/2}}-\frac {5 a^3 \cos (e+f x)}{128 c^3 f (c-c \sin (e+f x))^{3/2}}+\frac {\left (5 a^3\right ) \text {Subst}\left (\int \frac {1}{2 c-x^2} \, dx,x,-\frac {c \cos (e+f x)}{\sqrt {c-c \sin (e+f x)}}\right )}{128 c^4 f}\\ &=-\frac {5 a^3 \tanh ^{-1}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{128 \sqrt {2} c^{9/2} f}+\frac {a^3 c^2 \cos ^5(e+f x)}{4 f (c-c \sin (e+f x))^{13/2}}-\frac {5 a^3 \cos ^3(e+f x)}{24 f (c-c \sin (e+f x))^{9/2}}+\frac {5 a^3 \cos (e+f x)}{32 c^2 f (c-c \sin (e+f x))^{5/2}}-\frac {5 a^3 \cos (e+f x)}{128 c^3 f (c-c \sin (e+f x))^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 1.61, size = 371, normalized size = 1.94 \begin {gather*} \frac {a^3 \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (384 \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )-544 \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^3+236 \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^5-15 \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^7+(15+15 i) \sqrt [4]{-1} \tan ^{-1}\left (\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt [4]{-1} \left (1+\tan \left (\frac {1}{4} (e+f x)\right )\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^8+768 \sin \left (\frac {1}{2} (e+f x)\right )-1088 \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^2 \sin \left (\frac {1}{2} (e+f x)\right )+472 \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^4 \sin \left (\frac {1}{2} (e+f x)\right )-30 \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^6 \sin \left (\frac {1}{2} (e+f x)\right )\right ) (1+\sin (e+f x))^3}{384 f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^6 (c-c \sin (e+f x))^{9/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 3.56, size = 299, normalized size = 1.57
method | result | size |
default | \(-\frac {a^{3} \left (-15 \sqrt {2}\, \arctanh \left (\frac {\sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}}{2 \sqrt {c}}\right ) \left (\sin ^{4}\left (f x +e \right )\right ) c^{5}+30 \left (c \left (1+\sin \left (f x +e \right )\right )\right )^{\frac {7}{2}} c^{\frac {3}{2}}+60 \sqrt {2}\, \arctanh \left (\frac {\sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}}{2 \sqrt {c}}\right ) \left (\sin ^{3}\left (f x +e \right )\right ) c^{5}+292 \left (c \left (1+\sin \left (f x +e \right )\right )\right )^{\frac {5}{2}} c^{\frac {5}{2}}-90 \sqrt {2}\, \arctanh \left (\frac {\sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}}{2 \sqrt {c}}\right ) \left (\sin ^{2}\left (f x +e \right )\right ) c^{5}-440 \left (c \left (1+\sin \left (f x +e \right )\right )\right )^{\frac {3}{2}} c^{\frac {7}{2}}+60 \sqrt {2}\, \arctanh \left (\frac {\sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}}{2 \sqrt {c}}\right ) \sin \left (f x +e \right ) c^{5}+240 \sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, c^{\frac {9}{2}}-15 \sqrt {2}\, \arctanh \left (\frac {\sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}}{2 \sqrt {c}}\right ) c^{5}\right ) \sqrt {c \left (1+\sin \left (f x +e \right )\right )}}{768 c^{\frac {19}{2}} \left (\sin \left (f x +e \right )-1\right )^{3} \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}\) | \(299\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 563 vs.
\(2 (174) = 348\).
time = 0.38, size = 563, normalized size = 2.95 \begin {gather*} \frac {15 \, \sqrt {2} {\left (a^{3} \cos \left (f x + e\right )^{5} + 5 \, a^{3} \cos \left (f x + e\right )^{4} - 8 \, a^{3} \cos \left (f x + e\right )^{3} - 20 \, a^{3} \cos \left (f x + e\right )^{2} + 8 \, a^{3} \cos \left (f x + e\right ) + 16 \, a^{3} - {\left (a^{3} \cos \left (f x + e\right )^{4} - 4 \, a^{3} \cos \left (f x + e\right )^{3} - 12 \, a^{3} \cos \left (f x + e\right )^{2} + 8 \, a^{3} \cos \left (f x + e\right ) + 16 \, a^{3}\right )} \sin \left (f x + e\right )\right )} \sqrt {c} \log \left (-\frac {c \cos \left (f x + e\right )^{2} - 2 \, \sqrt {2} \sqrt {-c \sin \left (f x + e\right ) + c} \sqrt {c} {\left (\cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right )} + 3 \, c \cos \left (f x + e\right ) + {\left (c \cos \left (f x + e\right ) - 2 \, c\right )} \sin \left (f x + e\right ) + 2 \, c}{\cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right ) + 4 \, {\left (15 \, a^{3} \cos \left (f x + e\right )^{4} - 191 \, a^{3} \cos \left (f x + e\right )^{3} - 338 \, a^{3} \cos \left (f x + e\right )^{2} + 252 \, a^{3} \cos \left (f x + e\right ) + 384 \, a^{3} - {\left (15 \, a^{3} \cos \left (f x + e\right )^{3} + 206 \, a^{3} \cos \left (f x + e\right )^{2} - 132 \, a^{3} \cos \left (f x + e\right ) - 384 \, a^{3}\right )} \sin \left (f x + e\right )\right )} \sqrt {-c \sin \left (f x + e\right ) + c}}{1536 \, {\left (c^{5} f \cos \left (f x + e\right )^{5} + 5 \, c^{5} f \cos \left (f x + e\right )^{4} - 8 \, c^{5} f \cos \left (f x + e\right )^{3} - 20 \, c^{5} f \cos \left (f x + e\right )^{2} + 8 \, c^{5} f \cos \left (f x + e\right ) + 16 \, c^{5} f - {\left (c^{5} f \cos \left (f x + e\right )^{4} - 4 \, c^{5} f \cos \left (f x + e\right )^{3} - 12 \, c^{5} f \cos \left (f x + e\right )^{2} + 8 \, c^{5} f \cos \left (f x + e\right ) + 16 \, c^{5} f\right )} \sin \left (f x + e\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 539 vs.
\(2 (174) = 348\).
time = 0.66, size = 539, normalized size = 2.82 \begin {gather*} -\frac {\frac {120 \, \sqrt {2} a^{3} \log \left (-\frac {\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1}\right )}{c^{\frac {9}{2}} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} + \frac {\sqrt {2} {\left (3 \, a^{3} \sqrt {c} + \frac {16 \, a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1} + \frac {24 \, a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{2}}{{\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{2}} - \frac {48 \, a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{3}}{{\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{3}} - \frac {250 \, a^{3} \sqrt {c} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{4}}{{\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{4}}\right )} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{4}}{c^{5} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{4} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} + \frac {\frac {48 \, \sqrt {2} a^{3} c^{\frac {31}{2}} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1} - \frac {24 \, \sqrt {2} a^{3} c^{\frac {31}{2}} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{2} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}{{\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{2}} - \frac {16 \, \sqrt {2} a^{3} c^{\frac {31}{2}} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{3} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}{{\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{3}} - \frac {3 \, \sqrt {2} a^{3} c^{\frac {31}{2}} {\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{4} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}{{\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{4}}}{c^{20}}}{12288 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+a\,\sin \left (e+f\,x\right )\right )}^3}{{\left (c-c\,\sin \left (e+f\,x\right )\right )}^{9/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________